package com.designpattern.prototype.demo1;

import java.util.Date;

public class BiliBili {

    public static void main(String[] args) throws CloneNotSupportedException {
        Date date = new Date();
        Video v1 = new Video("狂神手JAVA", date);
        System.out.println("v1=>" + v1.toString());
        System.out.println("v1=>hash:"+v1.hashCode());

//v1 克隆 v2

        Video v2 = (Video) v1.clone();


        System.out.println("v2=>" + v2.toString());
        System.out.println("v2=>hash:"+v2.hashCode());

        Video v3= v1;
        System.out.println(v2.getClass());
        System.out.println(v2.getClass()==v1.getClass());
        System.out.println(v2.equals(v1));
        int i = System.identityHashCode(v1);
        int i2 = System.identityHashCode(v2);
        int i3 = System.identityHashCode(v3);
        System.out.println(i);
        System.out.println(i2);
        System.out.println(i3);
    }
}
